/**
 * 
 */
package com.nari.baseinfo.action;

import java.io.File;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.struts2.json.JSONUtil;
import org.apache.struts2.json.annotations.JSON;

import com.nari.baseinfo.model.IBuilding;
import com.nari.baseinfo.model.IBuildingUnit;
import com.nari.baseinfo.model.ICommunity;
import com.nari.baseinfo.model.IHeatRoom;
import com.nari.baseinfo.model.IProject;
import com.nari.baseinfo.model.IShareArea;
import com.nari.baseinfo.service.IBaseInfoExcelUploadService;
import com.nari.baseinfo.service.IBaseStatisService;
import com.nari.baseinfo.service.IBuildingService;
import com.nari.baseinfo.service.IBuildingUnitService;
import com.nari.baseinfo.service.ICommunityService;
import com.nari.baseinfo.service.IHeatRoomService;
import com.nari.baseinfo.service.IProjectService;
import com.nari.baseinfo.service.IShareAreaService;
import com.nari.baseinfo.utils.BaseStatisConstants;
import com.nari.baseinfo.utils.excelupload.res.BaseInfoExcelResource;
import com.nari.baseinfo.utils.statisentity.IGenericStatisEntity;
import com.nari.basic.service.IUserRoleService;
import com.nari.basic.service.IUserService;
import com.nari.coreframe.action.struts2.JSONActionSupport;
import com.nari.heatshare.model.IAssignMeter;
import com.nari.heatshare.service.IAssignMeterService;
import com.nari.platform.components.dhtmltree.DhtmlTreeNode;
import com.nari.platform.model.PageCond;
import com.nari.platform.model.ResponseMsg;
import com.nari.platform.model.ResultWithPageCond;
import com.opensymphony.xwork2.Action;

/**
 * 
 * @author Xiaopeng
 * @date 2013-8-1
 */
public class HeatRoomAction extends JSONActionSupport {
	private static final long serialVersionUID = -7224416961578820850L;
	private IHeatRoomService iHeatRoomService;
	private IProjectService iProjectService;
	private ICommunityService iCommunityService;
	private IShareAreaService iShareAreaService;
	private IBuildingService iBuildingService;
	private IBuildingUnitService iBuildingUnitService;
	private IAssignMeterService iAssignMeterService;
	private IBaseStatisService iBaseStatisService;
	private IUserService iUserService;
	private IUserRoleService iUserRoleService;
	private IBaseInfoExcelUploadService iBaseInfoExcelUploadService;
	// 热用户信息查询
	private String projectUID;
	private String communityUID;
	private Integer ifMeasureCharge;
	private String houseNo;
	private String roomOwner;
	private List<IProject> projectList;
	private List<ICommunity> communityList;
	// 分页查询
	private int pageIndex = 1; // 默认查询第一页列表
	private PageCond pageCond;
	private int pageSize;
	private ResultWithPageCond<IHeatRoom> heatRoomPage;
	private Map<String, String> pageProjectMap; // 所属项目id-projectName映射表
	private Map<String, String> pageCommunityMap; // 所属小区id-communityName映射表
	private Map<String, String> pageBuildingMap; // 所属楼栋id-buildingName映射表
	// 热用户信息管理
	private String heatRoomUID;
	private IHeatRoom heatRoom;
	private String buildingUID;
	private List<IBuilding> buildingList;
	private List<IBuildingUnit> buildingUnitList;
	private List<IShareArea> shareAreaList;
	private List<IAssignMeter> assignMeterList;
	// 热用户详细资料
	private IProject project;
	private ICommunity community;
	private IBuilding building;
	private IShareArea shareArea;
	private IBuildingUnit buildingUnit;
	private IGenericStatisEntity statisEntity;
	// 查询分摊域关联热用户
	private String shareAreaUID;
	private List<IHeatRoom> heatRoomList;
	//基础资料导入
	private File attachFile;
	private String attachFileFileName;
	//设置热用户所属分摊域
	private String roomIDList;
	private String nodeID;
	private String nodeType;
	private DhtmlTreeNode architectNodeTree;
	
	/**
	 * 热用户信息管理导航
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-26
	 */
	public String queryRoomMgrNav() throws Exception {
		//便于系统参数携带
		return "roomMgrNav";
	}

	/**
	 * 分页查询热用户列表
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-8-14
	 */
	public String queryHeatRoomPage() throws Exception {
		// 所属项目列表
		this.projectList = this.iProjectService.queryAllProjectInOrder();
		if (this.projectList == null) {
			this.projectList = new ArrayList<IProject>();
		}
		// 所属小区列表
		if (projectUID != null && !"".equals(projectUID)) {
			this.communityList = this.iCommunityService.queryCommunitysByBelongings(null, null, null, projectUID);
		} else {
			this.communityList = new ArrayList<ICommunity>();
		}
		// 分页信息
		this.pageCond = new PageCond();
		int start = (this.pageIndex - 1) * this.pageCond.getLimit();
		this.pageCond.setStart(start);
		if (communityUID != null && communityUID.length() > 0) {
			ICommunity co = iCommunityService.queryEntityById(communityUID);
			projectUID = co.getProjectID();
		}
		if (buildingUID != null && buildingUID.length() > 0) {
			IBuilding co = iBuildingService.queryEntityById(buildingUID);
			buildingUID = co.getProjectID();
		}
		// 分页结果
		this.heatRoomPage = this.iHeatRoomService.queryHeatRoomPage(houseNo,roomOwner, projectUID, communityUID, pageCond);
		// 计算结果集的页数
		this.pageSize = new BigDecimal(this.heatRoomPage.getPageCond().getTotal())
				.divide(new BigDecimal(this.heatRoomPage.getPageCond().getLimit()), RoundingMode.UP)
				.intValue();
		if (pageSize == 0) pageSize = 1;
		// 项目映射表
		this.pageProjectMap = new HashMap<String, String>();
		for (IProject project : this.projectList) {
			this.pageProjectMap.put(project.getId(), project.getProjectName());
		}
		// 小区映射表
		this.pageCommunityMap = this.iHeatRoomService.queryReferCommunitysByRoomList(heatRoomPage.getList());
		// 楼栋映射表
		this.pageBuildingMap = this.iHeatRoomService.queryReferBuildingsByRoomList(heatRoomPage.getList());
		return "heatRoomPage";
	}

	/**
	 * 热用户信息管理
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-8-14
	 */
	public String queryHeatRoomForManage() throws Exception {
		// 热用户信息
		if (this.heatRoomUID != null && !"".equals(heatRoomUID)) {
			this.heatRoom = this.iHeatRoomService.queryEntityById(heatRoomUID);
			this.projectUID = this.heatRoom.getProjectID();
			this.communityUID = this.heatRoom.getCommunityID();
			this.buildingUID = this.heatRoom.getBuildingID();
		}
		// 所属项目列表
		this.projectList = this.iProjectService.queryAllProjectInOrder();
		if (this.projectList == null) {
			this.projectList = new ArrayList<IProject>();
		}
		// 所属小区列表
		if (projectUID != null && !"".equals(projectUID)) {
			this.communityList = this.iCommunityService.queryCommunitysByBelongings(null, null, null, projectUID);
		} else {
			this.communityList = new ArrayList<ICommunity>();
		}
		// 所属楼栋列表、所属分摊区域列表
		if ((this.projectUID != null && !"".equals(projectUID))
				|| (this.communityUID != null && !"".equals(communityUID))) {
			this.buildingList = this.iBuildingService.queryBuildingByBelongings(projectUID, communityUID);
			this.shareAreaList = this.iShareAreaService.queryShareAreaByBelongings(projectUID, communityUID);
		} else {
			this.buildingList = new ArrayList<IBuilding>();
			this.shareAreaList = new ArrayList<IShareArea>();
		}
		// 所属楼栋单元列表
		if (this.buildingUID != null && !"".equals(buildingUID)) {
			this.buildingUnitList = this.iBuildingUnitService.queryUintListByBuildingUID(buildingUID, null);
		} else {
			this.buildingUnitList = new ArrayList<IBuildingUnit>();
		}
		return "heatRoomManage";
	}

	/**
	 * 新增或修改热用户信息
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-8-14
	 */
	public String saveOrUpdateHeatRoom() throws Exception {
		if (this.heatRoom.getId() != null && !"".equals(heatRoom.getId())) {
			this.iHeatRoomService.updateEntity(heatRoom, heatRoom.getId());
		} else {
			this.iHeatRoomService.saveEntity(heatRoom);
		}
		this.writeJsonStrToResponse(JSONUtil.serialize(ResponseMsg.getInstance(true, "")));
		return Action.SUCCESS;
	}
	
	/**
	 * 基础资料导入初始化
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-12-23
	 */
	public String initBaseInfoUpload() throws Exception {
		return "baseInfoUpload";
	}
	
	/**
	 * 基础资料导入
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-12-23
	 */
	public String uploadBaseInfo() throws Exception {
		if(attachFileFileName.toLowerCase().endsWith("xls") 
				|| attachFileFileName.toLowerCase().endsWith("xlsx")) {
			this.rmsg = iBaseInfoExcelUploadService.saveOrUpdateBaseInfo(attachFile, attachFileFileName);
		} else {
			this.rmsg = ResponseMsg.getInstance(false, "请上传正确的Excel数据文件！");
		}
		this.writeResponseToFileAsyncSubmit(JSONUtil.serialize(rmsg));
		return Action.SUCCESS;
	}

	/**
	 * 通过热用户唯一标识删除热用户信息
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-8-14
	 */
	public String deleteHeatRoomByUID() throws Exception {
		this.rmsg = this.iHeatRoomService.deleteCascadeByRoomUID(heatRoomUID);
		this.writeJsonStrToResponse(JSONUtil.serialize(rmsg));
		return Action.SUCCESS;
	}

	/**
	 * 通过热用户所属关系(所属项目、所属分摊域、所属楼栋)查询热用户列表
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-8-20
	 */
	public String queryHeatRoomsByBelongs() throws Exception {
		this.heatRoomList = this.iHeatRoomService.queryHeatRoomsByBelongs(projectUID, communityUID, shareAreaUID, buildingUID, ifMeasureCharge);
		this.writeJsonStrToResponse(JSONUtil.serialize(heatRoomList));
		return Action.SUCCESS;
	}
	
	

	/**
	 * 查询热用户详细资料
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-8-27
	 */
	public String queryHeatRoomDetailInfo() throws Exception {
		if (heatRoomUID != null && !"".equals(heatRoomUID)) {
			this.heatRoom = this.iHeatRoomService.queryEntityById(heatRoomUID);
			// 所属项目
			this.project = this.iProjectService.queryEntityById(heatRoom.getProjectID());
			// 所属小区
			this.community = this.iCommunityService.queryEntityById(heatRoom.getCommunityID());
			// 所属楼栋
			this.building = this.iBuildingService.queryEntityById(heatRoom.getBuildingID());
			// 所属分摊域
			if(heatRoom.getShareAreaID()!=null && !"".equals(heatRoom.getShareAreaID())) {
				this.shareArea = this.iShareAreaService.queryEntityById(heatRoom.getShareAreaID());
			}
			// 所属单元
			this.buildingUnit = this.iBuildingUnitService.queryEntityById(heatRoom.getUnitID());
			//统计信息
			this.statisEntity = iBaseStatisService.queryBaseStatisEntity(BaseStatisConstants.statisType_roomDetail, heatRoomUID);
			//所属分配表列表
			this.assignMeterList = iAssignMeterService.queryAssignMetersByBelongs(null, null, null, heatRoomUID);
		}
		return "roomDetail";
	}

	/**
	 * 热用户关联信息管理初始化
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-8-23
	 */
	public String initialHeatRoomLinkMgr() throws Exception {
		// 初始化热用户ID标识(heatRoomUID)
		return "initRoomLink";
	}
	
	/**
	 * 热用户所属分摊域设置
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-12-20
	 */
	public String initRoomAreaConfig() throws Exception {
		//分摊域UID：shareAreaUID
		return "roomAreaConfig";
	}
	
	/**
	 * 根据分摊域所属信息查询对应的楼栋用户结构树
	 * 楼栋用户结构树：
	 * 楼栋1
	 *   |-----单元11
	 *   |       |--楼层11
	 *   |       |    |--热用户11
	 *   |       |    |--热用户12
	 *   |       |    |--....
	 *   |       |--楼层12
	 *   |       |    |--....
	 *   |     单元12
	 *   |       |--.........
	 * 楼栋2
	 *   |-----单元21
	 *   |       |--楼层21
	 *   |       |    |--热用户21
	 *   |       |    |--热用户22
	 *   |       |    |--....
	 *   |     单元22
	 *   |       |--.........
	 *   ....................
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-12-20
	 */
	public String queryRelatedRoomArchitect() throws Exception {
		this.architectNodeTree = iHeatRoomService.queryRelatedRoomArchitect(shareAreaUID, nodeID, nodeType);
		this.writeJsonStrToResponse(JSONUtil.serialize(architectNodeTree));
		return Action.SUCCESS;
	}
	
	/**
	 * 设置热用户所属的分摊域
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-12-20
	 */
	public String saveAreaRoomArchitect() throws Exception {
		this.rmsg = iHeatRoomService.saveAreaRoomArchitect(shareAreaUID, roomIDList);
		this.writeJsonStrToResponse(JSONUtil.serialize(rmsg));
		return Action.SUCCESS;
	}

	/**
	 * 设置热用户所属分摊域
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-9-3
	 */
	public String assignHeatRoomArea() throws Exception {
		this.rmsg = this.iHeatRoomService.saveHeatRoomArea(shareAreaUID, roomIDList);
		this.writeJsonStrToResponse(JSONUtil.serialize(this.rmsg));
		return Action.SUCCESS;
	}
	
	/**
	 * 取消热用户所属分摊域设置
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2013-9-3
	 */
	public String cancelAreaHeatRoomByUID() throws Exception {
		this.heatRoom = this.iHeatRoomService.queryEntityById(heatRoomUID);
		this.heatRoom.setShareAreaID(null);
		this.iHeatRoomService.updateEntity(heatRoom, heatRoomUID);
		this.writeJsonStrToResponse(JSONUtil.serialize(ResponseMsg.getInstance(true, "")));
		return Action.SUCCESS;
	}
	
	/**
	 * 下载基础信息Excel导入模板
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-12
	 */
	public String downloadBseinfoExcelTemplate() throws Exception {
		//设置文件输出流
		this.setTargetFile(BaseInfoExcelResource.getBaseInfoResource());
		//设置模板名称
		this.setOutputFileName("基础信息Excel导入模板.xls");
		return "downloadTemplate";
	}
	
	/**
	 * 通过所属楼栋查询热用户列表
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-25
	 */
	public String queryRoomListByReferBuilding() throws Exception {
		this.heatRoomList = iHeatRoomService.queryHeatRoomsByBelongs(null, null, null, buildingUID);
		return "buildingRooms";
	}

	/**
	 * @return the iHeatRoomService
	 */
	@JSON(serialize = false)
	public IHeatRoomService getiHeatRoomService() {
		return iHeatRoomService;
	}

	/**
	 * @param iHeatRoomService
	 *            the iHeatRoomService to set
	 */
	public void setiHeatRoomService(IHeatRoomService iHeatRoomService) {
		this.iHeatRoomService = iHeatRoomService;
	}

	/**
	 * @return the iProjectService
	 */
	@JSON(serialize = false)
	public IProjectService getiProjectService() {
		return iProjectService;
	}

	/**
	 * @param iProjectService
	 *            the iProjectService to set
	 */
	public void setiProjectService(IProjectService iProjectService) {
		this.iProjectService = iProjectService;
	}

	/**
	 * @return the iCommunityService
	 */
	@JSON(serialize = false)
	public ICommunityService getiCommunityService() {
		return iCommunityService;
	}

	/**
	 * @param iCommunityService
	 *            the iCommunityService to set
	 */
	public void setiCommunityService(ICommunityService iCommunityService) {
		this.iCommunityService = iCommunityService;
	}

	/**
	 * @return the iShareAreaService
	 */
	@JSON(serialize = false)
	public IShareAreaService getiShareAreaService() {
		return iShareAreaService;
	}

	/**
	 * @param iShareAreaService
	 *            the iShareAreaService to set
	 */
	public void setiShareAreaService(IShareAreaService iShareAreaService) {
		this.iShareAreaService = iShareAreaService;
	}

	/**
	 * @return the iBuildingService
	 */
	@JSON(serialize = false)
	public IBuildingService getiBuildingService() {
		return iBuildingService;
	}

	/**
	 * @param iBuildingService
	 *            the iBuildingService to set
	 */
	public void setiBuildingService(IBuildingService iBuildingService) {
		this.iBuildingService = iBuildingService;
	}

	/**
	 * @return the iBuildingUnitService
	 */
	@JSON(serialize = false)
	public IBuildingUnitService getiBuildingUnitService() {
		return iBuildingUnitService;
	}

	/**
	 * @param iBuildingUnitService
	 *            the iBuildingUnitService to set
	 */
	public void setiBuildingUnitService(
			IBuildingUnitService iBuildingUnitService) {
		this.iBuildingUnitService = iBuildingUnitService;
	}

	/**
	 * @return the iAssignMeterService
	 */
	@JSON(serialize = false)
	public IAssignMeterService getiAssignMeterService() {
		return iAssignMeterService;
	}

	/**
	 * @param iAssignMeterService the iAssignMeterService to set
	 */
	public void setiAssignMeterService(IAssignMeterService iAssignMeterService) {
		this.iAssignMeterService = iAssignMeterService;
	}

	/**
	 * @return the iBaseStatisService
	 */
	@JSON(serialize = false)
	public IBaseStatisService getiBaseStatisService() {
		return iBaseStatisService;
	}

	/**
	 * @param iBaseStatisService the iBaseStatisService to set
	 */
	public void setiBaseStatisService(IBaseStatisService iBaseStatisService) {
		this.iBaseStatisService = iBaseStatisService;
	}

	/**
	 * @return the iUserService
	 */
	@JSON(serialize = false)
	public IUserService getiUserService() {
		return iUserService;
	}

	/**
	 * @param iUserService the iUserService to set
	 */
	public void setiUserService(IUserService iUserService) {
		this.iUserService = iUserService;
	}

	/**
	 * @return the iUserRoleService
	 */
	@JSON(serialize = false)
	public IUserRoleService getiUserRoleService() {
		return iUserRoleService;
	}

	/**
	 * @param iUserRoleService the iUserRoleService to set
	 */
	public void setiUserRoleService(IUserRoleService iUserRoleService) {
		this.iUserRoleService = iUserRoleService;
	}

	/**
	 * @return the iBaseInfoExcelUploadService
	 */
	@JSON(serialize = false)
	public IBaseInfoExcelUploadService getiBaseInfoExcelUploadService() {
		return iBaseInfoExcelUploadService;
	}

	/**
	 * @param iBaseInfoExcelUploadService the iBaseInfoExcelUploadService to set
	 */
	public void setiBaseInfoExcelUploadService(
			IBaseInfoExcelUploadService iBaseInfoExcelUploadService) {
		this.iBaseInfoExcelUploadService = iBaseInfoExcelUploadService;
	}

	/**
	 * @return the projectUID
	 */
	public String getProjectUID() {
		return projectUID;
	}

	/**
	 * @param projectUID
	 *            the projectUID to set
	 */
	public void setProjectUID(String projectUID) {
		this.projectUID = projectUID;
	}

	/**
	 * @param communityUID
	 *            the communityUID to set
	 */
	public void setCommunityUID(String communityUID) {
		this.communityUID = communityUID;
	}

	/**
	 * @return the houseNo
	 */
	public String getHouseNo() {
		return houseNo;
	}

	/**
	 * @param houseNo
	 *            the houseNo to set
	 */
	public void setHouseNo(String houseNo) {
		this.houseNo = houseNo;
	}

	/**
	 * @return the roomOwner
	 */
	public String getRoomOwner() {
		return roomOwner;
	}

	/**
	 * @param roomOwner
	 *            the roomOwner to set
	 */
	public void setRoomOwner(String roomOwner) {
		this.roomOwner = roomOwner;
	}

	/**
	 * @return the projectList
	 */
	public List<IProject> getProjectList() {
		return projectList;
	}

	/**
	 * @param projectList
	 *            the projectList to set
	 */
	public void setProjectList(List<IProject> projectList) {
		this.projectList = projectList;
	}

	/**
	 * @return the communityList
	 */
	public List<ICommunity> getCommunityList() {
		return communityList;
	}

	/**
	 * @param communityList
	 *            the communityList to set
	 */
	public void setCommunityList(List<ICommunity> communityList) {
		this.communityList = communityList;
	}

	/**
	 * @return the pageIndex
	 */
	public int getPageIndex() {
		return pageIndex;
	}

	/**
	 * @param pageIndex
	 *            the pageIndex to set
	 */
	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}

	/**
	 * @return the pageCond
	 */
	public PageCond getPageCond() {
		return pageCond;
	}

	/**
	 * @param pageCond
	 *            the pageCond to set
	 */
	public void setPageCond(PageCond pageCond) {
		this.pageCond = pageCond;
	}

	/**
	 * @return the pageSize
	 */
	public int getPageSize() {
		return pageSize;
	}

	/**
	 * @param pageSize
	 *            the pageSize to set
	 */
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	/**
	 * @return the heatRoomPage
	 */
	public ResultWithPageCond<IHeatRoom> getHeatRoomPage() {
		return heatRoomPage;
	}

	/**
	 * @param heatRoomPage
	 *            the heatRoomPage to set
	 */
	public void setHeatRoomPage(ResultWithPageCond<IHeatRoom> heatRoomPage) {
		this.heatRoomPage = heatRoomPage;
	}

	/**
	 * @return the pageProjectMap
	 */
	public Map<String, String> getPageProjectMap() {
		return pageProjectMap;
	}

	/**
	 * @param pageProjectMap
	 *            the pageProjectMap to set
	 */
	public void setPageProjectMap(Map<String, String> pageProjectMap) {
		this.pageProjectMap = pageProjectMap;
	}

	/**
	 * @return the pageCommunityMap
	 */
	public Map<String, String> getPageCommunityMap() {
		return pageCommunityMap;
	}

	/**
	 * @param pageCommunityMap
	 *            the pageCommunityMap to set
	 */
	public void setPageCommunityMap(Map<String, String> pageCommunityMap) {
		this.pageCommunityMap = pageCommunityMap;
	}

	/**
	 * @return the pageBuildingMap
	 */
	public Map<String, String> getPageBuildingMap() {
		return pageBuildingMap;
	}

	/**
	 * @param pageBuildingMap
	 *            the pageBuildingMap to set
	 */
	public void setPageBuildingMap(Map<String, String> pageBuildingMap) {
		this.pageBuildingMap = pageBuildingMap;
	}

	/**
	 * @return the heatRoomUID
	 */
	public String getHeatRoomUID() {
		return heatRoomUID;
	}

	/**
	 * @param heatRoomUID
	 *            the heatRoomUID to set
	 */
	public void setHeatRoomUID(String heatRoomUID) {
		this.heatRoomUID = heatRoomUID;
	}

	/**
	 * @return the heatRoom
	 */
	public IHeatRoom getHeatRoom() {
		return heatRoom;
	}

	/**
	 * @param heatRoom
	 *            the heatRoom to set
	 */
	public void setHeatRoom(IHeatRoom heatRoom) {
		this.heatRoom = heatRoom;
	}

	/**
	 * @return the buildingUID
	 */
	public String getBuildingUID() {
		return buildingUID;
	}

	/**
	 * @param buildingUID
	 *            the buildingUID to set
	 */
	public void setBuildingUID(String buildingUID) {
		this.buildingUID = buildingUID;
	}

	/**
	 * @return the buildingList
	 */
	public List<IBuilding> getBuildingList() {
		return buildingList;
	}

	/**
	 * @param buildingList
	 *            the buildingList to set
	 */
	public void setBuildingList(List<IBuilding> buildingList) {
		this.buildingList = buildingList;
	}

	/**
	 * @return the buildingUnitList
	 */
	public List<IBuildingUnit> getBuildingUnitList() {
		return buildingUnitList;
	}

	/**
	 * @param buildingUnitList
	 *            the buildingUnitList to set
	 */
	public void setBuildingUnitList(List<IBuildingUnit> buildingUnitList) {
		this.buildingUnitList = buildingUnitList;
	}

	/**
	 * @return the shareAreaList
	 */
	public List<IShareArea> getShareAreaList() {
		return shareAreaList;
	}

	/**
	 * @param shareAreaList
	 *            the shareAreaList to set
	 */
	public void setShareAreaList(List<IShareArea> shareAreaList) {
		this.shareAreaList = shareAreaList;
	}

	/**
	 * @return the project
	 */
	public IProject getProject() {
		return project;
	}

	/**
	 * @param project
	 *            the project to set
	 */
	public void setProject(IProject project) {
		this.project = project;
	}

	/**
	 * @return the community
	 */
	public ICommunity getCommunity() {
		return community;
	}

	/**
	 * @param community
	 *            the community to set
	 */
	public void setCommunity(ICommunity community) {
		this.community = community;
	}

	/**
	 * @return the building
	 */
	public IBuilding getBuilding() {
		return building;
	}

	/**
	 * @param building
	 *            the building to set
	 */
	public void setBuilding(IBuilding building) {
		this.building = building;
	}

	/**
	 * @return the shareArea
	 */
	public IShareArea getShareArea() {
		return shareArea;
	}

	/**
	 * @param shareArea
	 *            the shareArea to set
	 */
	public void setShareArea(IShareArea shareArea) {
		this.shareArea = shareArea;
	}

	/**
	 * @return the buildingUnit
	 */
	public IBuildingUnit getBuildingUnit() {
		return buildingUnit;
	}

	/**
	 * @param buildingUnit
	 *            the buildingUnit to set
	 */
	public void setBuildingUnit(IBuildingUnit buildingUnit) {
		this.buildingUnit = buildingUnit;
	}

	/**
	 * @return the statisEntity
	 */
	public IGenericStatisEntity getStatisEntity() {
		return statisEntity;
	}

	/**
	 * @param statisEntity the statisEntity to set
	 */
	public void setStatisEntity(IGenericStatisEntity statisEntity) {
		this.statisEntity = statisEntity;
	}

	/**
	 * @return the communityUID
	 */
	public String getCommunityUID() {
		return communityUID;
	}

	/**
	 * @return the ifMeasureCharge
	 */
	public Integer getIfMeasureCharge() {
		return ifMeasureCharge;
	}

	/**
	 * @param ifMeasureCharge the ifMeasureCharge to set
	 */
	public void setIfMeasureCharge(Integer ifMeasureCharge) {
		this.ifMeasureCharge = ifMeasureCharge;
	}

	/**
	 * @return the shareAreaUID
	 */
	public String getShareAreaUID() {
		return shareAreaUID;
	}

	/**
	 * @param shareAreaUID
	 *            the shareAreaUID to set
	 */
	public void setShareAreaUID(String shareAreaUID) {
		this.shareAreaUID = shareAreaUID;
	}

	/**
	 * @return the heatRoomList
	 */
	public List<IHeatRoom> getHeatRoomList() {
		return heatRoomList;
	}

	/**
	 * @param heatRoomList
	 *            the heatRoomList to set
	 */
	public void setHeatRoomList(List<IHeatRoom> heatRoomList) {
		this.heatRoomList = heatRoomList;
	}

	public File getAttachFile() {
		return attachFile;
	}

	public void setAttachFile(File attachFile) {
		this.attachFile = attachFile;
	}

	public String getAttachFileFileName() {
		return attachFileFileName;
	}

	public void setAttachFileFileName(String attachFileFileName) {
		this.attachFileFileName = attachFileFileName;
	}

	/**
	 * @return the roomIDList
	 */
	public String getRoomIDList() {
		return roomIDList;
	}

	/**
	 * @param roomIDList the roomIDList to set
	 */
	public void setRoomIDList(String roomIDList) {
		this.roomIDList = roomIDList;
	}

	public List<IAssignMeter> getAssignMeterList() {
		return assignMeterList;
	}

	public void setAssignMeterList(List<IAssignMeter> assignMeterList) {
		this.assignMeterList = assignMeterList;
	}

	/**
	 * @return the nodeID
	 */
	public String getNodeID() {
		return nodeID;
	}

	/**
	 * @param nodeID the nodeID to set
	 */
	public void setNodeID(String nodeID) {
		this.nodeID = nodeID;
	}

	/**
	 * @return the nodeType
	 */
	public String getNodeType() {
		return nodeType;
	}

	/**
	 * @param nodeType the nodeType to set
	 */
	public void setNodeType(String nodeType) {
		this.nodeType = nodeType;
	}

	/**
	 * @return the architectNodeTree
	 */
	public DhtmlTreeNode getArchitectNodeTree() {
		return architectNodeTree;
	}

	/**
	 * @param architectNodeTree the architectNodeTree to set
	 */
	public void setArchitectNodeTree(DhtmlTreeNode architectNodeTree) {
		this.architectNodeTree = architectNodeTree;
	}

}
